#{extends 'relationsHome.html' /} 
#{set title:'Relation' /}
#{set 'moreStyles'}

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="@{'/public/stylesheets/forms.css'}">
<link rel="stylesheet" href="@{'/public/stylesheets/tables.css'}">
<link rel="stylesheet" href="@{'/public/stylesheets/main.css'}">
<link rel="stylesheet" href="@{'/public/stylesheets/list.css'}">
<link rel="stylesheet" href="@{'/public/stylesheets/css3buttons.css'}">


</head>


#{/set}

<div id=left>

<br/>
<h2 align="left"> Edit relation names </h2>
<h4 align="left"> ${message} </h4>


#{if view.size() > 0}
<table id="rounded-corner" summary="All Relation Names" align="center" class="sortable">

    <thead>
    	<tr>
           	<th scope="col" class="rounded-delete">Delete</th>
            <th scope="col" class="rounded-relationName">Name</th>
            
         
        </tr>
    </thead>
     #{list items:view, as:'relation'}
    <tbody>
     
    	<tr>
        	
        	
            <td><a href="@{Relations.deleteName(relation.id)}" onclick="return confirm('Are you sure you want to delete this relation name ?')"><span class="trash icon">Delete </a></td>
            <td>${relation.relationName}</td>
        
           
        </tr>
       
    </tbody>
    
     #{/list}

    
</table>
#{/if}
     #{else} No relation names have been added yet #{/else}
</div>
